/***************************************************************
 *  Copyright (c) 2007 by GroupMe! Team (www.groupme.net)
 *  All rights reserved
 *
 *  This file is part of the GroupMe! Project. You can utilize
 *  software of the GroupMe! project under the terms of the 
 *  GNU Lesser General Public License as published by the
 *  Free Software Foundation in version 2.1.
 * 
 *  The GNU Lesser General Public License can be found at:
 *  http://www.gnu.org/licenses/lgpl.html
 *
 *  This copyright notice MUST APPEAR in all copies of the file!
 ***************************************************************/
package net.groupme.model;

import net.groupme.exceptions.UpdateFailedException;
import net.groupme.gui.rendering.Renderer;

/**
 * This interface defines a ResourceVisualization object in the GroupMe!
 * project. A ResourceVisualization is bound to a Resource
 * {@link net.groupme.model.Resource} and defines its visualization in the
 * userinterface (position, size etc.). For its processing it has a Renderer
 * {@link net.groupme.gui.rendering.Renderer}.
 * 
 * created on 15.04.2007
 * 
 * @author Mischa Frank <a
 *         href="mailto:code@planetfrank.net">code@planetfrank.net</a>
 * @author Patrick Siehndel <a
 *         href="mailto:patrick.siehndel@gmx.de">patrick.siehndel@gmx.de</a>
 * 
 * @version 0.1
 * 
 */
public interface ResourceVisualization extends Identifiable {

	/**
	 * This method returns the GroupVisualization in which the
	 * ResourceVisualization is grouped.
	 * 
	 * @return GroupVisualization to which the ResourceVisualization belongs to
	 */
	public GroupVisualization getGroupVisualization();

	/**
	 * This method returns the height of the ResourceVisualization.
	 * 
	 * @return height of the ResourceVisualization
	 */
	public int getHeight();

	/**
	 * This method returns the X-position of the ResourceVisualization.
	 * 
	 * @return X-position
	 */
	public int getPositionX();

	/**
	 * This method returns the Y-positoin of the ResourceVisualizatoin.
	 * 
	 * @return Y-position
	 */
	public int getPositionY();

	/** 
	 * This method returns the class name of the Renderer for the ResourceVisualization.
	 * 
	 * @return the identifier (bean name) of the {@link Renderer} which renders the underlying {@link Resource} instance.
	 */
	public String getRenderer();

	/**
	 * This method returns the Resource associated to the ResourceVisualization.
	 * 
	 * @return Resource which is associated to the Resource Visualization
	 */
	public Resource getResource();

	/**
	 * This method returns the width of the ResourceVisualization.
	 * 
	 * @return width of the ResourceVisualization
	 */
	public int getWidth();
	
	/**
	 * This method returns the z-Axis of the ResourceVisualization.
	 * 
	 * @return z-Axis of the ResourceVisualization
	 */
	public int getZAxis();

	/**
	 * This method sets the GroupVisualization in which the
	 * ResourceVisualization should be grouped.
	 * 
	 * @param visualization
	 * @throws UpdateFailedException 
	 */
	public void setGroupVisualization(GroupVisualization visualization) throws UpdateFailedException;

	/**
	 * This method sets the height of the ResourceVisualization.
	 * 
	 * @param height
	 * @throws UpdateFailedException
	 */
	public void setHeight(int height) throws UpdateFailedException;

	/**
	 * This method sets the X-position of the ResourceVisualization.
	 * 
	 * @param posX
	 * @throws UpdateFailedException
	 */
	public void setPositionX(int posX) throws UpdateFailedException;

	/**
	 * This method sets the Y-position of the ResourceVisualization.
	 * 
	 * @param posY
	 * @throws UpdateFailedException
	 */
	public void setPositionY(int posY) throws UpdateFailedException;
	
	/**
	 * This method sets the z-Axis of the ResourceVisualization.
	 * 
	 * @param zAxis
	 * @throws UpdateFailedException
	 */
	public void setZAxis(int zAxis) throws UpdateFailedException;

	/**
	 * This method sets the class name of the Renderer for the ResourceVisualization.
	 * 
	 * @param beanName the identifier (bean name) of the {@link Renderer} which renders the underlying {@link Resource} instance.
	 */
	public void setRenderer(String beanName);

	/**
	 * This method sets the Resource associated to the ResourceVisualization.
	 * 
	 * @param resource
	 *            which should be associated
	 * @throws UpdateFailedException
	 */
	public void setResource(Resource resource) throws UpdateFailedException;

	/**
	 * This method sets the width of the Resource Visualization.
	 * 
	 * @param width
	 * @throws UpdateFailedException
	 */
	public void setWidth(int width) throws UpdateFailedException;

}
